A magnetic disk storage device is generally used as an auxiliary storage device for information equipment. The magnetic disk storage device performs a read and a write of data on a unit of storage basis, which is called a sector.
A storage device using a semiconductor memory as a storage medium has been increasing in these years, instead of the above-described magnetic disk storage device. In particular, a storage device using a flash memory, a type of EEPROM (Electrically Erasable Programmable Read only Memory), has become a mainstream of the semiconductor memory storage device.
A flash memory is excellent in reading and writing data faster than a magnetic disk. However, there are four major limitations in using a flash memory. First, a unit of write (which is generally referred to as a page) and a unit of erase (which is generally referred to as a block) are predetermined and the unit of erase is larger than the unit of write. Second, in overwriting data, it is required to first erase existing data, and then rewrite new data. Third, in writing data into a single block consisting of plural pages, the data needs to be written on the pages sequentially in numerical order of the pages. And fourth, there is a limit to the number of erase times of each block.
One of the memory control methods based on such characteristics of the above-described flash memory is disclosed in which a plurality of pages constituting a physical block are divided into a data page on which data is held and an alternate page on which new data can be added. The method performs processings of writing a new write data into an alternate page, and, if the alternate page becomes full, copying only a valid data in the block into an empty block, and then erasing the block having the already-copied valid data [Patent Document 1]. In another similar method, one or more new blocks are set instead of the aforementioned alternate page [Patent Document 2].
[Patent Document 3] discloses a method in which: a block having fewer already-written data pages is searched each time a write operation is performed; a data is written into the searched block; in the meantime, a block having the largest number of pages with invalid data is searched; and the searched block is selected as a block to be erased.